-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: consensus messages #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! all comments are the same as for the rollapp-evm PR: dymensionxyz/rollapp-evm#351
app/app.go
Outdated
|
||
theType, err := proto.Marshal(resp) | ||
if err != nil { | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why return nil
? don't you need to append to responses
and continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to verify if this type of error is expected
_, isError := response.Response.(*abci.ConsensusMessageResponse_Error) | ||
require.True(t, isError, "Expected an error response but got a success") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd also suggest verifying the returned error string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danwt does not like to check error strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea but it's still better than nothing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think in theory you can check grpc status code
i haven't looked at it tho
app/app.go
Outdated
return resp | ||
} | ||
|
||
func (app *App) processConsensusMessage(ctx sdk.Context, consensusMsgs []*prototypes.Any) []*abci.ConsensusMessageResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as on the evm repo - and also as I wrote there - I suggest moving this method to common util on the RDK vs re-writing it (if possible) .
@@ -827,6 +832,11 @@ func NewRollapp( | |||
// upgrade. | |||
app.setPostHandler() | |||
|
|||
// Admission handler for consensus messages | |||
app.setAdmissionHandler(consensus.AllowedMessagesHandler([]string{ | |||
proto.MessageName(&banktypes.MsgSend{}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this message allowed?
Description
ADR link https://www.notion.so/dymension/ADR-x-Sequencer-Messages-34f95e2b579e458e8bb4252da19324bd
Closes https://github.com/dymensionxyz/epics/issues/1
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.
PR review checkboxes:
I have...
Unreleased
section inCHANGELOG.md
godoc
commentsSDK Checklist
map
time.Now()
sendCoin
and notSendCoins
Full security checklist here
----;
For Reviewer:
---;
After reviewer approval: